{% load i18n %}
{% extends "base.html" %}
 {% block content %}
 <form action="/admin/comments" method="post" >
   <div class="wrap">

      <h2>{% trans "Manage Comments"%}</h2>
      <div class="" style="padding:10px 5px 5px 5px"><B>{% trans "All Comments"%}</b><span style='color:gray'> ({{pager.count}}) </span></div>

      <div class="clear"></div>

	   <div class="tablenav">
		  <div class="alignleft">
		  <input type="submit" class="button-secondary delete" name="deleteit" value="{% trans "Delete"%}"/>
		  </div>
		  <div class="alignright">
	        {% if pager.prev %}
			<div class="alignleft"><a href="/admin/comments?page={{ pager.prev}}">{% trans "&laquo; prev"%}</a></div>
			{% endif %}

			{% if pager.next %}
			<div class="alignright"><a href="/admin/comments?page={{ pager.next }}">{%trans "next &raquo;"%}</a></div>
			{% endif %}	 <div class="alignright" style="padding:0px 10px;">{% blocktrans  with pager.page_index as pindex %}  Page {{pindex}}{% endblocktrans %}</div>
         </div>

		      <br class="clear"/>
	   </div>
	  <br class="clear"/>

	   <table class="widefat">
		<thead>
			<tr>
			<th class="check-column" scope="col"><input type="checkbox" onclick="$('input[name=checks]').attr('checked',this.checked);"/></th>
		<th>{% trans "Date"%}</th>	<th style="width: 15%;">{% trans "Author"%}</th><th>{%trans "Content"%}</th><th>{% trans "Email" %}</th>	<th>{% trans "Entry"%}</th>	</tr>
			</thead>
			<tbody>
            {%for comment in comments%}
		<tr valign="middle" id="link-{{comment.key}}"><th class="check-column" scope="row"><input type="checkbox" value="{{comment.key}}" name="checks"/></th>
                           <td>{{comment.date}}</td>

                           <td><strong><a target="_blank" class="row-title" title='Edit "{{comment.weburl}}"' href="{{comment.weburl}}">{{comment.author}}</a></strong></td>
                            <td>{{comment.content}}</td>
                            <td>{{comment.email}}</td>
                            <td><a  target="_blank" href="{{blog.baseurl}}/{{comment.entry.link}}" >{{comment.entry.title}}</a></td>

        		</tr>
			{%endfor%}
			</tbody>
		</table>

   </div>
</form>
 {% endblock  %}